<template>
  <div>
    <p @click="changeshow">点击选择</p>
    <addressCom :dName="name" :dCity="cityValue" @on-value="getValue"></addressCom>
    <standard :datas="goodsDetail" :showing="show" @on-value-change="valueChange" @on-show-change="showChange"></standard>
  </div>
</template>
<style scoped>
</style>
<script type="text/ecmascript-6">
  import standard from './../components/standardCom'
  import addressCom from './../components/addressCom'
  export default({
    name: 'home',
    components: {
      standard,
      addressCom
    },
    data () {
      return {
        goodsDetail: {
          goods: {
            goods_name: '这只是一个测试商品名称，不要在意',
            goods_cover: 'http://ovjc7q15t.bkt.clouddn.com/0b88257b-7d60-4bb9-8c0b-682bdb190168.jpg',
            price: 998,
            stock: 99,
          },
          itemList:[
            {id:164,goods_id:33,price:89.00,stock:198,goods_sku:"18:134#19:136",goods_name:'国服第一花木兰',goods_cover:'https://img.alicdn.com/bao/uploaded/i1/2347075098/TB2yjYMrSXlpuFjy0FeXXcJbFXa_!!2347075098.jpg_240x5000Q50s50.jpg_.webp'},
            {id:165,goods_id:33,price:99.00,stock:119,goods_sku:"18:134#19:137",goods_name:'国服第一蔡文姬',goods_cover:'https://img.alicdn.com/bao/uploaded/i2/TB1ZwexLpXXXXXRXFXXXXXXXXXX_!!0-item_pic.jpg_240x5000Q50s50.jpg_.webp'},
            {id:166,goods_id:33,price:99.00,stock:150,goods_sku:"18:135#19:136",goods_name:'国服第一李白',goods_cover:'https://img.alicdn.com/bao/uploaded/i3/260465043/TB2Bj.UcNsIL1JjSZFqXXceCpXa_!!260465043.jpg_240x5000Q50s50.jpg_.webp'},
            {id:167,goods_id:33,price:99.00,stock:199,goods_sku:"18:135#19:137",goods_name:'国服第一诸葛亮',goods_cover:'https://img.alicdn.com/bao/uploaded/i1/TB1jZtvIpXXXXX6XFXXXXXXXXXX_!!0-item_pic.jpg_240x5000Q50s50.jpg_.webp'}
          ],
          attrList: [
            {id:18,attr_name:"颜色",
              attr_value_list:[
                {id:134,attr_id:18,attr_value:"原色"},
                {id:135,attr_id:18,attr_value:"黄色"}
              ]
            },
            {id:19,attr_name:"规格",
              attr_value_list:[
                {id:136,attr_id:19,attr_value:"5kg"},
                {id:137,attr_id:19,attr_value:"10kg"}
              ]
            }
          ]
        },
        show: false,
        name: '拉拉',
        cityValue: {
          code: ["350000", "350200", "350206"],
          name: ["福建省", "厦门市", "湖里区"]
        }
      };
    },
    created () {
    },
    methods: {
      changeshow () {
        this.show = true
      },
      valueChange (vals) {
        console.log(vals)
      },
      showChange (val) {
        this.show = val
      },
      getValue (vals) {
        console.log(vals)
      }
    },
    watch: {
    }
  });
</script>
